/*
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */

#ifndef _GPATH_H
#define _GPATH_H

#include <cmath>

#include <QPainterPath>
#include <QRectF>
#include <QPointF>
#include <QFont>

#include "../gType.h"

class gPath: public QPainterPath{

	protected:
		virtual bool addGTypeGo(gTypeGo &, gTypeGo *);

	public:
		void addGContainer(gObjectContainer &);
		void addGObject(gObject &);

};

class gPathMoves: public gPath{

	protected:
		virtual bool addGTypeGo(gTypeGo &, gTypeGo *);

};

class gPathCuts: public gPath{

	private:
		void addGTypeGoCircle(gTypeGoCircle &, gTypeGo &);
	
	protected:
		virtual bool addGTypeGo(gTypeGo &, gTypeGo *);
		
	public:
		float degrees(float) const;
		float vectorAngle(float a0, float a1, float b0, float b1) const;

};

class gPathBuff: public gPathCuts{

	protected:
		virtual bool addGTypeGo(gTypeGo &, gTypeGo *);

};

class gPathPoints: public gPath{

	private:
		static const unsigned POINT_SIZE = 3;

		QMatrix *matrix;
		
	protected:
		virtual bool addGTypeGo(gTypeGo &, gTypeGo *);
	
	public:
		gPathPoints(QMatrix *);
		
        void addGBuffPoint(const QPointF &);
		void addGPoint(const QPointF &);
		void addGObject(gObject &);

};

class gPathLine: public gPathCuts{

	public:
        void addLineGo(gObject &, int i);
		void addAxis(gObject &, gTypeGo &);

};


#endif
